# Contributor: Roman Kyrylych <roman@archlinux.org>

pkgname=gnome-user-share
pkgver=3.28.0
pkgrel=1
pkgdesc="Easy to use user-level file sharing for GNOME"
arch=(x86_64)
url="https://git.gnome.org/browse/gnome-user-share"
license=(GPL)
depends=(mod_dnssd dconf gtk3 libnotify libcanberra)
makedepends=(intltool libnautilus-extension itstool docbook-xsl gnome-common git)
options=(!emptydirs)
groups=(gnome)
_commit=66aa73e5a55cfc42fbad6355c8b202aaf4763cdd  # tags/GNOME_USER_SHARE_3_28_0^0
source=("git+https://git.gnome.org/browse/gnome-user-share#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^GNOME_USER_SHARE_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc \
      --libexecdir=/usr/lib \
      --localstatedir=/var \
      --with-httpd=/usr/bin/httpd \
      --with-modules-path=/usr/lib/httpd/modules
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
